<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<form id="pagerForm" method="post" action="usermanage">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="<s:property value="pm.numPerPage"/>" />
	<input type="hidden" name="username" value="<s:property value="username"/>" />
</form>

<form onsubmit="return navTabSearch(this);" action="SearchUser_List" method="post">
<div class="pageHeader">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td align="left">
					用户账号:<s:textfield theme="simple" name="searchId" ></s:textfield>
				</td>
				<td align="left">
					用户名:<s:textfield theme="simple" name="searchName" ></s:textfield>
				</td>
				<td align="left">
					工号:<s:textfield theme="simple" name="searchCardID" ></s:textfield>  <!-- 查询功能有问题 -->
				</td>
			
				<td>
				<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
			</tr>
		</table>
		
	</div>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="User_Add" target="navTab" rel="User_Add"><span>新增</span></a></li>
			<li><a class="edit" id="User_Modify" href="User_Modify?user_id={user_id}" target="navTab" rel="User_Modify"><span>修改</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" href="User_BatchDelete" class="delete"><span>删除</span></a></li>
		</ul>
	</div>
		
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th align="center"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th align="center">用户账号</th>
				<th align="center">用户名</th>
				<!-- <th align="center">密码</th> -->
				<th align="center">工号</th>
				<th align="center">性别</th>
				<th align="center">手机</th>
				<th align="center">备注</th>
				<th align="center">操作人员</th>
				<th align="center">角色类型</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="pm.list" status="index"  var="cp" >
				<tr target="user_id" rel="<s:property value="userid"/>" modifyTagId="User_Modify"> 
					<td align="center"><input name="ids" value="<s:property value="userid"/>" type="checkbox"></td>
					<td align="center"><s:property value="userid"/></td>
					<td align="center"><s:property value="username"/></td>
					<%-- <td align="center"><s:property value="password"/></td> --%>
					<td align="center"><s:property value="cardid"/></td>
					<td align="center"><s:property value="sex"/></td>
					<td align="center"><s:property value="tel"/></td>
					<td align="center"><s:property value="description"/></td>
					<td align="center"><s:property value="recorder"/></td>
					<td align="center">
					<s:if test="roleid == 1">超级管理员</s:if>
					<s:elseif test="roleid == 2">助管</s:elseif>
					</td>
				</tr>
			</s:iterator>	
		</tbody>
	</table>
	
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option <s:if test='%{numPerPage=="20"}'>selected="selected"</s:if> value="20">20</option>
				<option <s:if test='%{numPerPage=="50"}'>selected="selected"</s:if> value="50">50</option>
				<option <s:if test='%{numPerPage=="100"}'>selected="selected"</s:if> value="100">100</option>
				<option <s:if test='%{numPerPage=="200"}'>selected="selected"</s:if> value="200">200</option>
			</select>
			<span>条，共${pm.totalCount}条</span>
		</div>
		
		<!--分页组件-->  
		<div class="pagination" targetType="navTab" totalCount="${pm.totalCount}" numPerPage="${pm.numPerPage}" pageNumShown="10" currentPage="${pm.pageNum}"></div>
	</div>
</div>
</form>
